package com.crois.barrier.web.loadbalance.rule;

import com.crois.barrier.common.dto.BarrierClientInstance;
import org.springframework.web.server.ServerWebExchange;
import java.util.List;

/**
 * @author Hou Ze Yu
 * @description 负载 均衡接口
 * @date 2020/7/16
 */
public interface LoadBalanceRule {

    /***
     * choose instance for List<DoorClientInstance></DoorClientInstance>
     * @param doorClientInstanceList
     * @return choose success for instance
     */
    BarrierClientInstance choose(List<BarrierClientInstance> doorClientInstanceList, ServerWebExchange serverWebExchange);

}
